# -*- coding: utf-8 -*-
# @Author   : Claus
# @Time     : 2020/6/21 13:38
# @FileName : jg1.py
import requests
from lxml import etree
header = {
            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36",
            'Cookie': 'JSESSIONID=9EBB93AE27FC185DD64AFB08E992703B.tomcat3_system_portal'
        }

detail_url = "https://www.whzbtb.com/V2PRTS/AmendBulletinInfoDetail.do?%69%64=%31%64%35%34%61%34%61%39%2d%38%30%65%63%2d%34%61%35%61%2d%39%34%64%65%2d%66%32%37%31%39%31%63%62%65%30%34%64"
requests.packages.urllib3.disable_warnings()
response = requests.get(detail_url, verify=False)
# print(response.content.decode())
html = etree.HTML(response.content.decode())
res = html.xpath("//div[@class='pageRight_box']")
print(res)
for i in res:
    a = etree.tostring(i, method="html")
    print(type(a))
    print(a.decode("utf-8"))

# demo = etree.HTML(a)
# text = etree.tostring(demo)
# print(text)